package org.example.huawei;

import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

/**
 * @author Yyming
 * @version 10.0
 * Created by Yyming on 2021/1/4
 */
public class Test2 {
    private static Set<Integer> set = new HashSet<>();
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int num = input.nextInt();
        set.add(2);
        for (int i = 2; i <= Math.sqrt(num); i++) {
            System.out.println(set.size());
            if (set.contains(i)) {
                for (int j = i; j < num; j++) {
                    if (set.contains(j) || cal(j)) {
                        if (i * j == num) {
                            System.out.println(i +" "+j);
                            return;
                        }
                    }
                }
            }
        }
        System.out.println("-1 -1");
    }

    private static boolean cal(int r) {
        for (int i = 2; i <= Math.sqrt(r); i++) {
            if (r % i == 0) {
                return false;
            }
        }
        return true;
    }
}
